Skip to content

BigQuery: enable FROM-first SELECT - #2439

Merged
iffyio merged 5 commits into
apache:mainfrom
moshap-firebolt:bigquery-from-first-select
Aug 20, 2026
Merged

BigQuery: enable FROM-first SELECT#2439
iffyio merged 5 commits into
apache:mainfrom
moshap-firebolt:bigquery-from-first-select

Conversation

@moshap-firebolt

Copy link
Copy Markdown
Contributor

BigQuery allows a query to start with FROM, e.g. FROM t and FROM t SELECT *,
which is also the entry form for pipe syntax (FROM t |> ...).

The parser already supports FROM-first SELECT behind
Dialect::supports_from_first_select() (enabled for ClickHouse, DuckDB and
Generic); this enables it for BigQuery as well. The existing
test_select_from_first / test_select_from_first_with_cte, parameterized over
all_dialects_where(|d| d.supports_from_first_select()), now cover BigQuery.

Docs: https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#from_queries

BigQuery allows a query to start with `FROM`, e.g. `FROM t` and `FROM t SELECT *`,
which is also the entry form for pipe syntax (`FROM t |> ...`).

The parser already supports FROM-first `SELECT` behind
`Dialect::supports_from_first_select()` (enabled for ClickHouse, DuckDB and
Generic); this enables it for BigQuery as well. The existing
`test_select_from_first` / `test_select_from_first_with_cte`, parameterized over
`all_dialects_where(|d| d.supports_from_first_select())`, now cover BigQuery.

Docs: https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#from_queries

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>

@LucaCappelletti94 LucaCappelletti94 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Include tests for the big query dialect to avoid regressions.

Add regression tests for the BigQuery dialect's FROM-first `SELECT`: the bare
`FROM t` (`FromFirstNoSelect`) and `FROM t SELECT ...` (`FromFirst`) forms, and
`FROM t |> ...` as the entry form for pipe syntax.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@moshap-firebolt

Copy link
Copy Markdown
Contributor Author

Include tests for the big query dialect to avoid regressions.

Done.

Comment thread tests/sqlparser_bigquery.rs Outdated
Comment thread tests/sqlparser_bigquery.rs Outdated
moshap-firebolt and others added 3 commits August 19, 2026 19:13
Co-authored-by: Ifeanyi Ubah <ify1992@yahoo.com>
Co-authored-by: Ifeanyi Ubah <ify1992@yahoo.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@iffyio iffyio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @moshap-firebolt!

@iffyio
iffyio added this pull request to the merge queue Aug 20, 2026
Merged via the queue into apache:main with commit 7076b79 Aug 20, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants